package com.czk;

import com.czk.service.CarServiceImpl;
import org.apache.cxf.jaxws.JaxWsServerFactoryBean;

/**
 * @Author:ChenZhangKun
 * @Date: 2021/9/17 14:22
 */
public class AppTest {
    public static void main(String[] args) {
        // 发布服务的工厂
        JaxWsServerFactoryBean factory = new JaxWsServerFactoryBean();
        // 设置地址
        factory.setAddress("http://127.0.0.1:9999");
        // 设置服务类
        factory.setServiceBean(new CarServiceImpl());
        // 发布
        factory.create();
        System.out.println("发布服务成功，服务的wsdl地址是：http://127.0.0.1:9999?wsdl");
    }
}
